home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13685 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.nask.org.pl!usenet
  2. From: piotrpar@blue.maloka.waw.pl (Piotr Parlewicz)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Borlands Container Classes
  5. Date: Tue, 26 Mar 1996 21:13:46 GMT
  6. Organization: Research and Academic Computer Network
  7. Message-ID: <4j9mj8$rj6@bilbo.nask.org.pl>
  8. References: <4j6q5c$jl3@mongol.sasknet.sk.ca>
  9. NNTP-Posting-Host: s111.maloka.waw.pl
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. psc1@mailhost.sasknet.sk.ca (Dave Goertz) wrote:
  13.  
  14. >This is probably an easy question but... I want to put one of my own 
  15. >classes in a TIArrayAsVector.  Everything goes well until link time when 
  16. >it gives me the error "Illegal structure operation in function 
  17. >TMICVectorImp<MyClass,TStandardAllocator>::Find(const MyClass *) cont".  
  18. >The code it dies on is:
  19.  
  20. >             if( Data[loc] &&
  21. >               *STATIC_CAST(T *,STATIC_CAST(void *,Data[loc])) == *t )
  22. >                  return loc;
  23. [...]
  24. >Dave.
  25.  
  26. Does your MyClass include the == operator? If not, then the Find
  27. function cant use it to compare items in the array against the
  28. searched item.
  29.  
  30. Piotr Parlewicz
  31.  
  32.